<?php
include './Public/functions.php';
session_start();
function __autoload($className){
    if (substr($className,-10)== 'Controller'){
        include "./Controller/{$className}.php";
    }else{
        include "./tool/{$className}.php";
    }
}
//控制器
$c = isset($_GET['c'])?$_GET['c']:'Index';
$c = "{$c}Controller";
$c = new $c;
//方法
$a = isset($_GET['a'])?$_GET['a']:'index';
$c->$a();